<template>
  <flexbox class="bottom-reapply" :gutter="0">
    <flexboxItem>
      <a id="submit-btn" @click="goToApply">重新申请</a>
    </flexboxItem>
  </flexbox>
</template>

<script>
  import { Flexbox, FlexboxItem } from 'vux';
  export default {
    name: 'BottomReApply',
    props: ['applyType'],
    components: {
      Flexbox,
      FlexboxItem
    },
    mounted () {
    },
    methods: {
      goToApply: function () {
        let pushData = this.$parent.applyInfoDatail;
        pushData.IsReApply = true;
        if (this.applyType === 1) {
          this.$router.push({
            name: 'WriteAskLeave',
            query: {
              applyInfo: JSON.stringify(pushData)
            }
          });
        } else if(this.applyType === 2){
          this.$router.push({
            name: 'WriteContract',
            query: {
              applyInfo: JSON.stringify(pushData)
            }
          });
        } else if(this.applyType === 4){
          this.$router.push({
            name: 'WriteKey',
            query: {
              applyInfo: JSON.stringify(pushData)
            }
          });
        } else if(this.applyType === 3){
            this.$router.push({
            name: 'WriteSecret',
            query: {
              applyInfo: JSON.stringify(pushData)
            }
          }); 
        } else if(this.applyType === 5){
            this.$router.push({
            name: 'WriteHolLeave',
            query: {
              applyInfo: JSON.stringify(pushData)
            }
          }); 
        } else if(this.applyType === 6){
            this.$router.push({
            name: 'WriteFDH',
            query: {
              applyInfo: JSON.stringify(pushData)
            }
          }); 
        }
      }
    }
  };
</script>

<style scoped lang="scss">
  @import '../../assets/style/variable';

  .bottom-reapply{
    width: 100%;
    position: absolute;
    bottom: 0;
    z-index: 2;
    a{
      display: block;
      width: 100%;
      line-height: getRem(98);
      font-size: getRem(32);
      text-align: center;
      color: #fff;
      background-image: linear-gradient(97deg,
        #fa5864 0%,
        #fc476d 100%),
      linear-gradient(
          #d91616,
          #d91616);
      background-blend-mode: normal,
      normal;
    }
  }
</style>
